//
//  RYMediaPicker.h
//  NOAHWM
//
//  Created by Ryan on 13-6-18.
//  Copyright (c) 2013年 Ryan. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import <MapKit/MapKit.h>
typedef enum {
    kAllType = 0,
    kPhotoType,
    kMovieType
}FileType;

@protocol RYMediaPickerDelegate;

@interface RYMediaPicker : NSObject
<UINavigationControllerDelegate, UIImagePickerControllerDelegate,
CLLocationManagerDelegate,MKReverseGeocoderDelegate>

@property (nonatomic, assign) BOOL showExtraInfo;       //是否获取media文件的详细信息，默认no
@property (nonatomic, assign) id<RYMediaPickerDelegate> delegate;
@property (nonatomic, assign) id parentController;      //基于parentController present picker
@property (nonatomic, assign) BOOL mediaEditing;        //media文件是否能编辑，默认no
@property (nonatomic, assign) FileType fileType;        //media文件的类型

//详细信息
@property (nonatomic, retain) CLLocation *fileLocation; //media文件的经纬度
@property (nonatomic, retain) NSDate *fileDate;         //media文件的日期
@property (nonatomic, copy) NSString *fileLocationName; //media文件的地址名称

//基本信息
@property (nonatomic, retain) NSData *fileData;         //media文件的二进制流数据
@property (nonatomic, retain) NSString *fileName;       //media文件的文件名 - 唯一识别名称

+ (RYMediaPicker *)sharedPicker;

- (void)takePhotoWithCamera;
- (UIImagePickerController *)getPhotoFromLibrary;
@end

@protocol RYMediaPickerDelegate <NSObject>

- (void)didGetFileWithData:(RYMediaPicker *)mediaPicker;
- (void)didGetFileFailedWithMessage:(NSString *)mes;
@end
